The Color XCMD is free for use in any non-comercial Stack for HyperCard. If you are interested in using Color in a commercial Stack, please contact us for details.
On CompuServe: 72356,253
On GEnie: B.Tuttle
or on our BBS
The Information Shoppe @ (404) 288-7535
300-2400 baud / 24 Hours a day / 8 Days a week
Color will allow you to control the foreground and background colors of HyperCard. Though Color doesn’t give you full control of the color capabilities of the Macintosh II, it does give you the ability to use color until HyperCard is upgraded to support it. There are limits to what you can do, but then you didn’t have any color in HyperCard before.
The card is divided horizontally into 16 segments, each segment is 31 pixels wide. Due to the way HyperCard updates the screen, any change of color on the screen in a segment affects anything else in that segment at the same vertical pixel position.
Thus, in order to keep a new color from affecting an existing one, make sure the areas you are coloring do not fall into a common segment at the same height.
Keep in mind that stacks using Color will work on black & white Macs, but any attempt to set the foreground or background color will be ignored. Even things like “Color White,Black”, which would be inversed, will show up in normal black on white on a non-color Macintosh.
The colorizing is dynamic. That is, the color is NOT saved with the card, it must be re-applied by a script each time the card or object is displayed. Anything that redraws the screen will set EVERYTHING to the current color. Sometimes this may simply be a script ending, or choosing another tool. Look at the examples in this stack & you will get an idea of what is required. Also, if you press the Command & Option keys to see the buttons, the screen area around the buttons will be redone in the last color set.
-- part contents for background part 10
----- text -----
Syntax:
Color <foreColor> [,<backColor>]
If you specify only the foreColor, then the background color is not changed. Optionally you may specify the background color seperated from the foreground color by a comma. This will set both colors. If you wish to change the background color & leave the foreground color unchanged you may specify the foreground color as “None”. (“None” will work as well for the background color)
Additional parameters for color are:
Normal - in either position resets the foreground color to Black & the background color to White.
Version - returns the version number of this XCMD in The Result.
Error Messages - returned in The Result
“You must specify a color!” - No parameters were given. Color will also beep once.
“Too many colors! Only 2 allowed.” - More than 2 parameters were given. Extra is ignored.
Color allows you to set the Foreground and Background colors to any of eight colors. These colors are Black, White, Red, Green, Blue, Cyan, Magenta, & Yellow. Of course you must have a Macintosh II with a color monitor & be set for at least 16 colors in order to see the colors.